﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Collections;
namespace GPCSC.Web.SHFW
{
    public partial class C_View :  PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            F_bound();
            IsRead();//标记已读
        }
        protected void IsRead()
        {
            string ids = Usual.f_querystringToString("ids");
            Hashtable htable = new Hashtable();
            GPCSC.Webs.databyhtable dh = new GPCSC.Webs.databyhtable();
            htable.Clear();
            htable.Add("isread", 1);
            dh.databyhtables(htable, "update", "CL_TZUSER", "CLUSid", ids);

        }
        protected void F_bound()
        {
            string ids = Usual.f_querystringToString("id");
            DataSet ds = new CL_TZ_S().TzView(ids);
            if (ds.Tables.Count > 0)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    count.InnerHtml = ds.Tables[0].Rows[0]["cont"].ToString();
                    title.InnerHtml = ds.Tables[0].Rows[0]["Title"].ToString();
                    Fuser.InnerHtml = ds.Tables[0].Rows[0]["creaTBy"].ToString();
                    #region 附件信息
                    DataSet dss = new CL_TZ_S().getfile(ds.Tables[0].Rows[0]["CL_TZ_SOID"].ToString());
                    string FJUrls = "";
                    if (dss.Tables.Count > 0)
                    {
                        if (dss.Tables[0].Rows.Count > 0)
                        {
                            //FJUrls += "<ul>";
                            foreach (DataRow drf in dss.Tables[0].Rows)
                            {
                              //  FJUrls += "<li><a href=\"#\" onclick=\"opens('" + drf["TZURL"].ToString() + "')\" >" + drf["filename"].ToString() + "</a></li>";
                                FJUrls += "<div style=\"cursor:pointer\" onclick=\"opens('" + drf["TZURL"].ToString() + "')\">" + drf["filename"].ToString() + "</div>";
                            }
                            //FJUrls += "</ul>";
                         
                        }
                    }

                    //.InnerHtml = FJUrls;
                    fjList.InnerHtml = FJUrls;

                    #endregion


                }
            }
        }
    }
}